	<!-- 当前所在位置 START -->
	{include file="_url.here.tpl"}
	<!-- 当前所在位置 END -->

	<!-- 主体区 -->
	<div class="area">

		<!-- 主体左边区 START -->
		<div class="aleft">
			
			<!-- 左边导航栏 START -->
			{include file='./user/_user.nav.tpl'}
			<!-- 左边导航栏 END -->
			
		</div>
		<!-- 主体左边区 END -->

		<!-- 主体右边区 START -->
		<div class="aright">

			<!-- 订单信息 START -->
			<div class="sl_t_block bdcolor-red">
				<div class="tt">
					<h2 class="color-red">订单信息</h2>
				</div>

				<div class="main-block pattern_line_right pattern-halve">
					<dl class="first-col"><dt>sn：</dt><dd>{$orderinfo.sn}</dd></dl>
					<dl><dt>收货人：</dt><dd>{$orderinfo.consignee}</dd></dl>
					<dl><dt>总重量：</dt><dd>{$orderinfo.weight}kg</dd></dl>
					<dl class="first-col"><dt>总价：</dt><dd>{$orderinfo.goods_cost}</dd></dl>
					<dl><dt>配送方式：</dt><dd>{$deliveryinfo.name}</dd></dl>
					<dl><dt>支付方式：</dt><dd>{$paymentinfo.name}</dd></dl>
					<dl class="first-col"><dt>下单时间：</dt><dd>{$orderinfo.addtime}</dd></dl>
					<div class="clear"></div>
				</div>

			</div>
			<!-- 订单信息 END -->

			<div class="space20"></div>

			<form id="fm_comment" action="./index.php" method="post" target="ajax">
				<input type="hidden" name="frm" value="user" />
				<input type="hidden" name="mdl" value="order" />
				<input type="hidden" name="do" value="comment" />
				<input type="hidden" name="sn" value="{$orderinfo.sn}" />

				<!-- 评价 START -->
				<div class="secondary_tag_block">
					<div class="cmtab"><a href="#" class="first cur">评价</a></div>

					<div class="main-block">

						<!-- 总评 START -->
						<div class="star-line">
							<dl><dt>商品与描述相符：</dt><dd><input type="hidden" name="score_desc" value="0" /><em>&nbsp;</em><i class="star star1" title="非常不满"><i class="star star2" title="不满意"><i class="star star3" title="一般"><i class="star star4" title="满意"><i class="star star5" title="非常满意"></i></i></i></i></i></dd><div class="clear"></div></dl>
							<dl><dt>商家的服务态度：</dt><dd><input type="hidden" name="score_serv" value="0" /><em>&nbsp;</em><i class="star star1" title="非常不满"><i class="star star2" title="不满意"><i class="star star3" title="一般"><i class="star star4" title="满意"><i class="star star5" title="非常满意"></i></i></i></i></i></dd><div class="clear"></div></dl>
							<dl><dt>商家的发货速度：</dt><dd><input type="hidden" name="score_speed" value="0" /><em>&nbsp;</em><i class="star star1" title="非常不满"><i class="star star2" title="不满意"><i class="star star3" title="一般"><i class="star star4" title="满意"><i class="star star5" title="非常满意"></i></i></i></i></i></dd><div class="clear"></div></dl>
						</div>
						<!-- 总评 END -->

						<!-- 商品列表 START -->
						{foreach from=$goodslist item=goods}

						<div class="tit-block">
							<div class="title">【{$goods.sn}】<a href="{$goods.url}" target="_blank">{$goods.goodsinfo.name}</a></div>
							<!-- 规格 START -->
							<div class="pattern_line_right pattern-halve">
								{foreach from=$goods.fspecs item=spec}
								<dl><dt>{$spec.name}：</dt><dd>{$spec.value}</dd></dl>
								{/foreach}
							</div>
							<!-- 规格 END -->
							<div class="star-line">
								<dl><dt>商品与描述相符：</dt><dd><input type="hidden" name="score_descs[{$goods.goodsid}][{$goods.id}]" value="0" /><em>&nbsp;</em><i class="star star1" title="非常不满"><i class="star star2" title="不满意"><i class="star star3" title="一般"><i class="star star4" title="满意"><i class="star star5" title="非常满意"></i></i></i></i></i></dd><div class="clear"></div></dl>
							</div>
							<ul class="single_line_cols pattern-halve">
								<li><textarea name="contents[{$goods.goodsid}][{$goods.id}]" class="text" style="width:464px; height:180px;"></textarea></li>
								<li><a href="{$goods.url}" title="{$goods.goodsinfo.name}<br />
--------<br />
重量：{$goods.goodsinfo.fweight}{$goods.goodsinfo.weightunit}<br />
单价：￥{$goods.goodsinfo.price}" target="_blank" class="poshytip"><img src="{$_s.up_dir}thumb/200_180/{$goods.goodsinfo.cover}" /></a></li>
								<div class="clear"></div>
							</ul>
							
						</div>
						{/foreach}
						<!-- 商品列表 END -->

					</div>

				</div>
				<!-- 评价 END -->

				<div class="space20"></div>
				<input type="submit" name="isdo" value="提交评价" class="btn-main" />

			</form>

		</div>
		<!-- 主体右边区 END -->



	</div>

	<script type="text/javascript" language="JavaScript" charset="utf-8">
	<!--

		var sn = '{$orderinfo.sn}';
		var state			= parseInt('{$orderinfo.state}');
		var payment_state	= parseInt('{$orderinfo.payment_state}');
		var delivery_state	= parseInt('{$orderinfo.delivery_state}');

		{literal}
		/*var cls = {
			'2'		: 'bgreen'
			,'1'	: 'borange'
			,'0'	: 'bdark'
			,'-1'	: 'bblue'
			,'-2'	: 'bred'
		};*/

		jQuery(function($){

			$('i[class^="star"]').click(function(evt){
				evt.stopPropagation();
				var star = (/(\d)/i.exec($(this).attr('class'))).pop();
				var title = $(this).attr('title');
				$(this).addClass('star_sel')
					.find('i').removeClass('star_sel').end()
					.parents('i').addClass('star_sel').end()
					.parents('dd').find('input[type="hidden"]').val(star).end()
						.find('em').html('&nbsp;'+star+'分，'+title);
				//console.log(star);
				return false;
			});
			$('div.star-line dd').hover(function(){
				$(this).find('i').removeClass('star_sel');
			}, function(){
				var star = $(this).find('input[type="hidden"]').val();
				if(star > 0){
					for(var i = 1; i <= star; i ++){
						$(this).find('i[class$="star'+i+'"]').addClass('star_sel');
					}
				}
			});

			$('#fm_comment').submit(function(evt){
				if(state < 2 || payment_state < 2 || delivery_state < 2){
					showmsg_warning('本次交易还未完成，不可评价！');
					return false;
				}else{
					if(state > 2){
						showmsg_warning('您已经评价过本次交易了');
						return false;
					}
				}
				var score_desc	= $(this).find('input[name="score_desc"]').val();
				var score_serv	= $(this).find('input[name="score_serv"]').val();
				var score_speed	= $(this).find('input[name="score_speed"]').val();
				var errmsg = [];
				if(score_desc == '0'){errmsg.push('未打分“商品与描述相符”');}
				if(score_serv == '0'){errmsg.push('未打分“商品与描述相符”');}
				if(score_speed == '0'){errmsg.push('未打分“商品与描述相符”');}
				if(errmsg.length > 0){
					evt.iscancelled = true;
					showmsg_warning(errmsg.join('<br />'));
					return false;
				}
				return true;
			});
		});

		function comment_callback(params){
			if(params.result == 'succ'){
				params.msg = '评价成功';
				params['onClosed'] = function(){
					window.location.href = './index.php?frm=user&mdl=order&do=view&sn='+sn;
				}
			}else{
				if(params.msg == ''){
					params.msg = '评价失败';
				}
			}
			callback_common(params);
		}
		{/literal}
	-->
	</script>